package com.icloud.framework.exception;

import org.springframework.http.HttpStatus;


public abstract class AbstractBusinessException extends RuntimeException {

    public AbstractBusinessException(){

    }
    public AbstractBusinessException(String message){
        super(message);
    }

    public AbstractBusinessException(Throwable cause) {
        super(cause);
    }

    public AbstractBusinessException(String message, Throwable cause) {
        super(message, cause);
    }

    public abstract HttpStatus getStatus();



    public FailureObject buildFailureResult(){
       return new FailureObject(getStatus(),this.getMessage(),this.getClass().toString());
    }


}
